import './assets/styles/base.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index.js'
import pinia from './store/index.js'
import ActiveNumber from '@/components/active-number/index.vue'
import Echart from '@/components/echart/index.vue'
import DataBox from '@/components/data-box/index.vue'
import CustomTable from '@/components/custom-table/index.vue'
import DataItem from '@/components/data-item/index.vue'
import DataItemImg from '@/components/data-item-img/index.vue'
import { vue3ScrollSeamless } from 'vue3-scroll-seamless'
const app = createApp(App)
app.use(pinia)
app.use(router)
app.component('ActiveNumber', ActiveNumber)
app.component('Echarts', Echart)
app.component('DataBox', DataBox)
app.component('CustomTable', CustomTable)
app.component('DataItem', DataItem)
app.component('DataItemImg', DataItemImg)
app.component('vue3ScrollSeamless', vue3ScrollSeamless)
app.directive('cover', {
  mounted(el, binding) {
    el.src = import.meta.env.VITE_APP_BASE_API + binding.value
  },
  updated(el, binding) {
    el.src = import.meta.env.VITE_APP_BASE_API + binding.value
  },
})
app.mount('#app')
